package com.heima.apis.wemedia;

import com.heima.model.admin.dto.ChannelDto;
import com.heima.model.admin.dto.NewsAuthDto;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.wemedia.pojos.WmChannel;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(value = "leadnews-wemedia")
public interface IWemdiaClient {

    @PostMapping("/api/v1/news/list_vo")
    public ResponseResult findAllScan(@RequestBody NewsAuthDto dto);

    @GetMapping("/api/v1/news/one_vo/{id}")
    ResponseResult findById(@PathVariable("id") Integer id);

    @PostMapping("/api/v1/news/auth_fail")
    ResponseResult updateFail(@RequestBody NewsAuthDto dto);

    @PostMapping("/api/v1/news/auth_pass")
    ResponseResult updatePass(@RequestBody NewsAuthDto dto);

    /**
     * yww 频道管理feign
     * @param id
     * @return
     */
    @GetMapping("/api/v1/channel/del/{id}")
    public ResponseResult channelDeleteC(@PathVariable("id") Integer id);

    @PostMapping("/api/v1/channel/list")
    public ResponseResult pageFindC(@RequestBody ChannelDto dto);

    @PostMapping("/api/v1/channel/save")
    public ResponseResult channelSaveC(@RequestBody WmChannel wmChannel);

    @PostMapping("/api/v1/channel/update")
    public ResponseResult channelUpdateC(@RequestBody WmChannel wmChannel);
}
